﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Services;
using System.Web.Services.Protocols;
/// <summary>
/// Descripción breve de ColegiosService
/// </summary>
public partial class Service
{
    [WebMethod]
    public string colegiosAgregarColegio(string colegiorazonsocial, string colegiodomicilio, string colegiolocalidad)
    {return ColegiosDA.insertColegio(colegiorazonsocial, colegiodomicilio, colegiolocalidad);
    }

    [WebMethod]
    public DataTable colegiosListarColegios()
    {
        return ColegiosDA.selectColegios(); 
    }

    [WebMethod]
    public string colegiosEliminarColegio(string colegioid)
    {
        return ColegiosDA.deleteColegio(colegioid); 
    }

    [WebMethod]
    public string colegiosModificarColegio(string colegioid, string colegiorazonsocial, string colegiodomicilio, string colegiolocalidad)
    {
        return ColegiosDA.updateColegio(colegioid, colegiorazonsocial, colegiodomicilio, colegiolocalidad);
    }

    [WebMethod]
    public bool colegiosExiste(string colegioid)
    {
       
        if (ColegiosDA.BuscarColegio(colegioid)!=""){return true;}
        else{return false;}
    }
}
